home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7619 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.rain.org!usenet
  2. From: "Guus Leeuw jr." <guusl@eiffel.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Best way to insert in file
  5. Date: Tue, 27 Feb 1996 11:27:52 -0800
  6. Organization: Interactive Software Engineering Inc. http://www.eiffel.com/
  7. Message-ID: <31335B38.7306EBA@eiffel.com>
  8. References: <4gldjl$cck@news.fwi.com> <1996Feb25.164738.7783@zcon.com> <4gqvppINNh86@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: @outback.eiffel.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.8 i586)
  14.  
  15. Kazimir Kylheku wrote:
  16. [snip snip]
  17. >  >19.14:  How can I insert or delete a line (or record) in the middle of a
  18. >  >        file?
  19. >  >
  20. >  >If you do not have the comp.lang.c FAQ, it can be found at rtfm.mit.edu
  21. >  >in an appropriate subdirectory of /pub/usenet/.
  22. > Of course, the real answer is to avoid writing a C program, and use a filter
  23. > utility called "sed". I have used this little program to edit the 200,000+th
  24. > line of a 400,000 line text file. Writing C code to do the same thing is
  25. > redundant, considering that sed can do all kinds of things to a file other than
  26. > just insert and delete lines.
  27.  
  28. What makes you think that person is using UNIX?
  29. If the person in question uses DOS / Windows, he still needs a valid answer in C. And
  30. indeed the FAQ regards this one... ;-)
  31.  
  32. Regards,
  33.     Guus
  34.